﻿using Terraria;
using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria.ModLoader;

namespace EAS.Content.Items
{
    public class Mysteryscarecrow : ModItem
    {
        public override void SetStaticDefaults()
        {
            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
        }
        public override void SetDefaults()
        {
            Item.width = 40;
            Item.height = 40;
            Item.rare = ItemRarityID.Purple;
            Item.accessory = true;
            Item.defense = 0;
            Item.lifeRegen = 10;
        }


        public override void AddRecipes()
        {
            CreateRecipe(1)
            .AddIngredient(ItemID.LunarBar, 10)
            .AddIngredient(ItemID.MechanicalGlove, 1)
            .AddTile(TileID.LunarCraftingStation)
            .Register();
        }


        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.GetAttackSpeed(DamageClass.Melee) *= 5f;
            player.GetDamage(DamageClass.Generic) *= 10f;
            player.statLifeMax2 = 1;
            player.statDefense /= 0;
        }
    }
}
